import Vue from 'vue'
import App from './App'
import ElementUI, {Table, TableColumn} from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VForm from 'vform-builds' //引入VForm库
import router from './router'
import store from './store'
import method from './method/global'
import Axios from './method/axios'
import * as echarts from 'echarts'
import 'vform-builds/dist/VFormDesigner.css' //引入VForm样式

//注册组件
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VForm)
Vue.use(method)

//配置axios
Vue.prototype.$http = Axios

new Vue({
  el: '#app',
  router,//挂载router
  store,//挂载store
  components: {App},
  template: '<App/>'
})

// 获取组件的props
const TableProps = Table.props
const TableColumnProps = TableColumn.props

// 修改默认props
// 全局el-table设置
TableProps.border.default = true // 边框
// 全局el-table-column设置
TableColumnProps.align.default = 'center' // 居中
TableColumnProps.showOverflowTooltip.default = true // 文本溢出

TableProps.border = {type: Boolean, default: true} // 边框
